import traceback
from MyTools.myutils import TestUtils

cookie_str = 'rememberMe=true; Library-Admin-Expires-In=720; sidebarStatus=1; Admin-Expires-In=1440; username=%E8%BF%9E%E4%B8%B0; password=G9jzeosoH0BPaZ0N/lNzMXeXcaYut0Z6tiVM1gRKKx/Qn+Y3hi+wMNN6Zxs350XvizjDzPNmtUf4/bAMHJhvNQ==; integrated-platform-Token=e9b05cfc-e56e-44bc-89d2-7112471fb64d; Admin-Token=e9b05cfc-e56e-44bc-89d2-7112471fb64d; SECKEY_ABVK=hbVcCBnZy3Y2r74l/VeL+AytpyAchwmhRV/6J37ZlEc%3D; BMAP_SECKEY=h0GreOuoteGplhKyj-kuo_GtQjgZPBNiivZ8Qk0_CCmmEOUuhxDC0fgdR3_OowNY1FBH9A9UFtRuBWrd4Hs0VvV5pDDtcGZ4hlqvo_WYsQi8TJlqU4vICgPAZlhKBC3iT3rmXZbhry5Ojv-cVAtsSe9i4SSKD3Y0tWkoRSuJiTRhJMRZi6au_c5AH-rDflYH'

# 用于测试协同与集运融合后页面点击问题的测试类
class MytestClass(TestUtils):

    #################################  企业  ######################################
    def test_RH_qiye(self):
        self.open("http://10.0.0.75:811/index")
        self.check_status(self)
        try:
            #cookie_str = 'rememberMe=true; sidebarStatus=0; Admin-Expires-In=1440; Library-Admin-Token=efc23d1e-4231-4e4c-a4bc-bd9580fca98a; Library-Admin-Expires-In=1440; username=%E8%BF%9E%E4%B8%B0; Admin-Token=7ca90765-50a7-4764-95dc-7778aba3585d; SECKEY_ABVK=15f1tu6efvNtyWjLK00b9eq/O6lDkhfQy2Iw9GZ3sQA%3D; BMAP_SECKEY=4tI4P075HGG4nzQR9ivDkYMwa9Nurh3hBEXOjMGcRzkEqzyvK-VLA8lLzOg4oCi_6FiuNsMzP36Cnr9XSSrZanCOLy-qIY4Zqx9zh48y7yTrTsBPmPC2vuQEGTqzwzZ60e5u8bVbVundbxUkyFfhhokHpfxM9N7BvkBp6sPL4DNV0hQZhkDbYuaoB6TBcMgN; password=dsXIP9RWOy5e0iXd93+PQAeW68MAo97nraIeoHprH1TUyH3Xrj+IgP0HjC7YXIGYT6Cn2k3doL82GpJRl19wVg==; integrated-platform-Token=b3453bcc-a8cd-4b64-92e5-c8b30832fd1b'
            self.cookie_adder(cookie_str)
            self.maximize_window()
            self.open("http://10.0.0.75:811/index")
            self.check_status(self)
            while True:
                #############################  基础信息  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(15) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(1)')
                

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(15) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(2)')
                

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(15) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(3)')
                

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(15) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(4)')
                

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(15) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(5)')
                

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(15) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(6) > div')
                

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(15) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(7)')
                

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(15) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(8)')
                

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(15) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(9)')
                

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(15) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(10)')
                

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(15) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(11) > div')
                

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(15) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(12)')
                

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(15) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(13)')
                

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(15) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(14)')
                

                ##############################  业务设置  ##########################################
                #有BUG，开票信息打开为空白页
                #self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                #self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(15) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(1)')
                

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(15) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(2)')
                

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(15) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(3)')
                

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(15) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(4)')
                

                if self.get_current_url() != 'http://10.0.0.75:811':  # 变更这里的 URL 为你希望跳转的页面
                    print("测试完成")
                    break


        except Exception as e:
            print(f"抱歉，出现错误：{str(e)}")
            tb_str = traceback.format_exception(value=e, tb=e.__traceback__)
            print("".join(tb_str))  # 显示详细的错误追踪信息，包括在哪一行代码触发的错误



    ##############################  场区  ##########################################
    def test_RH_changqu(self):
        self.open("http://10.0.0.75:811/index")
        self.check_status(self)
        try:
            #cookie_str = 'rememberMe=true; sidebarStatus=0; Admin-Expires-In=1440; Library-Admin-Token=efc23d1e-4231-4e4c-a4bc-bd9580fca98a; Library-Admin-Expires-In=1440; username=%E8%BF%9E%E4%B8%B0; Admin-Token=7ca90765-50a7-4764-95dc-7778aba3585d; SECKEY_ABVK=15f1tu6efvNtyWjLK00b9eq/O6lDkhfQy2Iw9GZ3sQA%3D; BMAP_SECKEY=4tI4P075HGG4nzQR9ivDkYMwa9Nurh3hBEXOjMGcRzkEqzyvK-VLA8lLzOg4oCi_6FiuNsMzP36Cnr9XSSrZanCOLy-qIY4Zqx9zh48y7yTrTsBPmPC2vuQEGTqzwzZ60e5u8bVbVundbxUkyFfhhokHpfxM9N7BvkBp6sPL4DNV0hQZhkDbYuaoB6TBcMgN; password=dsXIP9RWOy5e0iXd93+PQAeW68MAo97nraIeoHprH1TUyH3Xrj+IgP0HjC7YXIGYT6Cn2k3doL82GpJRl19wVg==; integrated-platform-Token=b3453bcc-a8cd-4b64-92e5-c8b30832fd1b'
            self.cookie_adder(cookie_str)
            self.maximize_window()
            self.open("http://10.0.0.75:811/index")
            self.check_status(self)
            while True:
                #############################  场站管理  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(16) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(16) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(16) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(3)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(16) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(4)')

                ##############################  场区管控  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(16) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(16) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(16) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(3)')

                ##############################  设备管理  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(16) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(16) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(2)')


                if self.get_current_url() != 'http://10.0.0.75:811':  # 变更这里的 URL 为你希望跳转的页面
                    print("测试完成")
                    break

        except Exception as e:
            print(f"抱歉，出现错误：{str(e)}")
            tb_str = traceback.format_exception(etype=type(e), value=e, tb=e.__traceback__)
            print("".join(tb_str))  # 显示详细的错误追踪信息，包括在哪一行代码触发的错误

    ##############################  贸易  ##########################################
    def test_RH_maoyi(self):
        self.open("http://10.0.0.75:811/index")
        self.check_status(self)
        try:
            #cookie_str = 'rememberMe=true; sidebarStatus=0; Admin-Expires-In=1440; Library-Admin-Token=efc23d1e-4231-4e4c-a4bc-bd9580fca98a; Library-Admin-Expires-In=1440; username=%E8%BF%9E%E4%B8%B0; Admin-Token=7ca90765-50a7-4764-95dc-7778aba3585d; SECKEY_ABVK=15f1tu6efvNtyWjLK00b9eq/O6lDkhfQy2Iw9GZ3sQA%3D; BMAP_SECKEY=4tI4P075HGG4nzQR9ivDkYMwa9Nurh3hBEXOjMGcRzkEqzyvK-VLA8lLzOg4oCi_6FiuNsMzP36Cnr9XSSrZanCOLy-qIY4Zqx9zh48y7yTrTsBPmPC2vuQEGTqzwzZ60e5u8bVbVundbxUkyFfhhokHpfxM9N7BvkBp6sPL4DNV0hQZhkDbYuaoB6TBcMgN; password=dsXIP9RWOy5e0iXd93+PQAeW68MAo97nraIeoHprH1TUyH3Xrj+IgP0HjC7YXIGYT6Cn2k3doL82GpJRl19wVg==; integrated-platform-Token=b3453bcc-a8cd-4b64-92e5-c8b30832fd1b'
            self.cookie_adder(cookie_str)
            self.maximize_window()
            self.open("http://10.0.0.75:811/index")
            self.check_status(self)
            while True:
                #############################  销售管理  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(17) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(17) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(17) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(3)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(17) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(4)')

                ##############################  采购管理  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(17) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(17) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(17) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(3)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(17) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(4)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(17) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(5)')

                if self.get_current_url() != 'http://10.0.0.75:811':  # 变更这里的 URL 为你希望跳转的页面
                    print("测试完成")
                    break

        except Exception as e:
            tb_str = traceback.format_exception(etype=type(e), value=e, tb=e.__traceback__)
            print(f"抱歉，出现错误：{str(e)}")
            print("".join(tb_str))  # 显示详细的错误追踪信息，包括在哪一行代码触发的错误

    ##############################  运输  ##########################################
    def test_RH_yunshu(self):
        self.open("http://10.0.0.75:811/index")
        self.check_status(self)
        try:
            #cookie_str = 'rememberMe=true; sidebarStatus=0; Admin-Expires-In=1440; Library-Admin-Token=efc23d1e-4231-4e4c-a4bc-bd9580fca98a; Library-Admin-Expires-In=1440; username=%E8%BF%9E%E4%B8%B0; Admin-Token=7ca90765-50a7-4764-95dc-7778aba3585d; SECKEY_ABVK=15f1tu6efvNtyWjLK00b9eq/O6lDkhfQy2Iw9GZ3sQA%3D; BMAP_SECKEY=4tI4P075HGG4nzQR9ivDkYMwa9Nurh3hBEXOjMGcRzkEqzyvK-VLA8lLzOg4oCi_6FiuNsMzP36Cnr9XSSrZanCOLy-qIY4Zqx9zh48y7yTrTsBPmPC2vuQEGTqzwzZ60e5u8bVbVundbxUkyFfhhokHpfxM9N7BvkBp6sPL4DNV0hQZhkDbYuaoB6TBcMgN; password=dsXIP9RWOy5e0iXd93+PQAeW68MAo97nraIeoHprH1TUyH3Xrj+IgP0HjC7YXIGYT6Cn2k3doL82GpJRl19wVg==; integrated-platform-Token=b3453bcc-a8cd-4b64-92e5-c8b30832fd1b'
            self.cookie_adder(cookie_str)
            self.maximize_window()
            self.open("http://10.0.0.75:811/index")
            self.check_status(self)
            while True:
                #############################  地图  ##########################################
                #有BUG，地图信息打开为空白页
                # self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                # element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                # print("正在测试的应用是"+element_text)
                # self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(1)')

                ##############################  运输管理  ##########################################
                #有BUG，运输计划打开为空白页
                # self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                # element_text = self.get_text(
                #     '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                # print("正在测试的应用是" + element_text)
                # self.click_when_visible_and_close(
                #     '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(3) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(3)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(4) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(4)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(5) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(5)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(6) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(6) > div')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(7) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(7)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(8) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(8)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(9) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(9)')

                ##############################  运输调度  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(3) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(3)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(4) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(4)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(5) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(5)')

                ##############################  在途管理  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(4) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(4) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(4) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(4) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(4) > div.wrap-item > div:nth-child(3) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(4) > div.wrap-item > div:nth-child(3)')

                ##############################  能耗管理  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(3) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(3)')

                ##############################  安全管控  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(6) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(6) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(6) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(6) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(6) > div.wrap-item > div:nth-child(3) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(6) > div.wrap-item > div:nth-child(3)')

                ##############################  磅单管理  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(7) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(7) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(7) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(7) > div.wrap-item > div:nth-child(2)')

                ##############################  运输结算  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(8) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(8) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(8) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(8) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(8) > div.wrap-item > div:nth-child(3) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(8) > div.wrap-item > div:nth-child(3)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(8) > div.wrap-item > div:nth-child(4) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(8) > div.wrap-item > div:nth-child(4)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(8) > div.wrap-item > div:nth-child(5) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(8) > div.wrap-item > div:nth-child(5)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(8) > div.wrap-item > div:nth-child(6) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(8) > div.wrap-item > div:nth-child(6) > div')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(8) > div.wrap-item > div:nth-child(7) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(8) > div.wrap-item > div:nth-child(7)')

                ##############################  运单管理  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(9) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(9) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(9) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(9) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(9) > div.wrap-item > div:nth-child(3) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(9) > div.wrap-item > div:nth-child(3)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(9) > div.wrap-item > div:nth-child(4) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(9) > div.wrap-item > div:nth-child(4)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(9) > div.wrap-item > div:nth-child(5) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(9) > div.wrap-item > div:nth-child(5)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(9) > div.wrap-item > div:nth-child(6) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(9) > div.wrap-item > div:nth-child(6) > div')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(9) > div.wrap-item > div:nth-child(7) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(9) > div.wrap-item > div:nth-child(7)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(9) > div.wrap-item > div:nth-child(8) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(9) > div.wrap-item > div:nth-child(8)')

                ##############################  安全分析  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(10) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(10) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(10) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(10) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(10) > div.wrap-item > div:nth-child(3) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(10) > div.wrap-item > div:nth-child(3)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(10) > div.wrap-item > div:nth-child(4) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(10) > div.wrap-item > div:nth-child(4)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(10) > div.wrap-item > div:nth-child(5) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(10) > div.wrap-item > div:nth-child(5)')

                ##############################  运输报表  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(11) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(11) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(11) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(11) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(11) > div.wrap-item > div:nth-child(3) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(11) > div.wrap-item > div:nth-child(3)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(11) > div.wrap-item > div:nth-child(4) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(11) > div.wrap-item > div:nth-child(4)')

                ##############################  行车数据  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(12) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(12) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(12) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(12) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(12) > div.wrap-item > div:nth-child(3) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(12) > div.wrap-item > div:nth-child(3)')
                ##############################  车务管理  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(13) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(13) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(13) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(13) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(13) > div.wrap-item > div:nth-child(3) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(13) > div.wrap-item > div:nth-child(3)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(13) > div.wrap-item > div:nth-child(4) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(13) > div.wrap-item > div:nth-child(4)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(13) > div.wrap-item > div:nth-child(5) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(13) > div.wrap-item > div:nth-child(5)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(13) > div.wrap-item > div:nth-child(6) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(13) > div.wrap-item > div:nth-child(6) > div')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(13) > div.wrap-item > div:nth-child(7) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close(
                    '#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(18) > div > div.app-menu > div:nth-child(13) > div.wrap-item > div:nth-child(7)')

                if self.get_current_url() != 'http://10.0.0.75:811':  # 变更这里的 URL 为你希望跳转的页面
                    print("测试完成")
                    break

        except Exception as e:
            print(f"抱歉，出现错误：{str(e)}")
            tb_str = traceback.format_exception(etype=type(e), value=e, tb=e.__traceback__)
            print("".join(tb_str))  # 显示详细的错误追踪信息，包括在哪一行代码触发的错误

    ##############################  称重  ##########################################
    def test_RH_chengzhong(self):
        self.open("http://10.0.0.75:811/index")
        self.check_status(self)
        try:
            #cookie_str = 'rememberMe=true; sidebarStatus=0; Admin-Expires-In=1440; Library-Admin-Token=efc23d1e-4231-4e4c-a4bc-bd9580fca98a; Library-Admin-Expires-In=1440; username=%E8%BF%9E%E4%B8%B0; Admin-Token=7ca90765-50a7-4764-95dc-7778aba3585d; SECKEY_ABVK=15f1tu6efvNtyWjLK00b9eq/O6lDkhfQy2Iw9GZ3sQA%3D; BMAP_SECKEY=4tI4P075HGG4nzQR9ivDkYMwa9Nurh3hBEXOjMGcRzkEqzyvK-VLA8lLzOg4oCi_6FiuNsMzP36Cnr9XSSrZanCOLy-qIY4Zqx9zh48y7yTrTsBPmPC2vuQEGTqzwzZ60e5u8bVbVundbxUkyFfhhokHpfxM9N7BvkBp6sPL4DNV0hQZhkDbYuaoB6TBcMgN; password=dsXIP9RWOy5e0iXd93+PQAeW68MAo97nraIeoHprH1TUyH3Xrj+IgP0HjC7YXIGYT6Cn2k3doL82GpJRl19wVg==; integrated-platform-Token=b3453bcc-a8cd-4b64-92e5-c8b30832fd1b'
            self.cookie_adder(cookie_str)
            self.maximize_window()
            self.open("http://10.0.0.75:811/index")
            self.check_status(self)
            while True:
                #############################  称重过磅  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(1)')

                #有BUG，称重控制台打开为空白页
                # self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                # element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                # print("正在测试的应用是" + element_text)
                # self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(2)')
                #
                # self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                # element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(3) > div > div.router-title')
                # print("正在测试的应用是" + element_text)
                # self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(3)')
                #
                # self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                # element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(4) > div > div.router-title')
                # print("正在测试的应用是" + element_text)
                # self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(4)')

                ##############################  过磅管理  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(2)')

                ##############################  称重报表  ##########################################
                #有BUG，磅房生产统计打开为空白页
                # self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                # element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                # print("正在测试的应用是" + element_text)
                # self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(1)')
                #
                # self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                # element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                # print("正在测试的应用是" + element_text)
                # self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(3) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(3)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(4) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(4)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(5) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(5)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(6) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(19) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(6)')

                if self.get_current_url() != 'http://10.0.0.75:811':  # 变更这里的 URL 为你希望跳转的页面
                    print("测试完成")
                    break

        except Exception as e:
            print(f"抱歉，出现错误：{str(e)}")
            tb_str = traceback.format_exception(etype=type(e), value=e, tb=e.__traceback__)
            print("".join(tb_str))  # 显示详细的错误追踪信息，包括在哪一行代码触发的错误

    ##############################  仓储  ##########################################
    def test_RH_cangchu(self):
        self.open("http://10.0.0.75:811/index")
        self.check_status(self)
        try:
            #cookie_str = 'rememberMe=true; sidebarStatus=0; Admin-Expires-In=1440; Library-Admin-Token=efc23d1e-4231-4e4c-a4bc-bd9580fca98a; Library-Admin-Expires-In=1440; username=%E8%BF%9E%E4%B8%B0; Admin-Token=7ca90765-50a7-4764-95dc-7778aba3585d; SECKEY_ABVK=15f1tu6efvNtyWjLK00b9eq/O6lDkhfQy2Iw9GZ3sQA%3D; BMAP_SECKEY=4tI4P075HGG4nzQR9ivDkYMwa9Nurh3hBEXOjMGcRzkEqzyvK-VLA8lLzOg4oCi_6FiuNsMzP36Cnr9XSSrZanCOLy-qIY4Zqx9zh48y7yTrTsBPmPC2vuQEGTqzwzZ60e5u8bVbVundbxUkyFfhhokHpfxM9N7BvkBp6sPL4DNV0hQZhkDbYuaoB6TBcMgN; password=dsXIP9RWOy5e0iXd93+PQAeW68MAo97nraIeoHprH1TUyH3Xrj+IgP0HjC7YXIGYT6Cn2k3doL82GpJRl19wVg==; integrated-platform-Token=b3453bcc-a8cd-4b64-92e5-c8b30832fd1b'
            self.cookie_adder(cookie_str)
            self.maximize_window()
            self.open("http://10.0.0.75:811/index")
            self.check_status(self)
            while True:
                #############################  仓储规则  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(3) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(3)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(4) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(4)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(5) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(5)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(6) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(6) > div')

                ##############################  库存管理  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(3) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(3)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(4) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(4)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(5) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(5)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(6) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(6) > div')
                #有BUG，库存盘点打开为空白页
                # self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                # element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(7) > div > div.router-title')
                # print("正在测试的应用是" + element_text)
                # self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(7) > div')

                ##############################  入库管理  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(3) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(3)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(4) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(4)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(5) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(5)')

                ##############################  出库管理  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(4) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(4) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(4) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(4) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(4) > div.wrap-item > div:nth-child(3) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(4) > div.wrap-item > div:nth-child(3)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(4) > div.wrap-item > div:nth-child(4) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(4) > div.wrap-item > div:nth-child(4)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(4) > div.wrap-item > div:nth-child(5) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(4) > div.wrap-item > div:nth-child(5)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(4) > div.wrap-item > div:nth-child(6) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(4) > div.wrap-item > div:nth-child(6) > div')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(4) > div.wrap-item > div:nth-child(7) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(4) > div.wrap-item > div:nth-child(7)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(4) > div.wrap-item > div:nth-child(8) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(4) > div.wrap-item > div:nth-child(8)')

                ##############################  仓储报表  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(3) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(3)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(4) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(4)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(5) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(5)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(6) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(6) > div')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(7) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(7)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(8) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(8)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(9) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(9)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(10) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(10)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(11) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(20) > div > div.app-menu > div:nth-child(5) > div.wrap-item > div:nth-child(12) > div')

                if self.get_current_url() != 'http://10.0.0.75:811':  # 变更这里的 URL 为你希望跳转的页面
                    print("测试完成")
                    break

        except Exception as e:
            print(f"抱歉，出现错误：{str(e)}")
            tb_str = traceback.format_exception(etype=type(e), value=e, tb=e.__traceback__)
            print("".join(tb_str))  # 显示详细的错误追踪信息，包括在哪一行代码触发的错误

    ##############################  质检  ##########################################
    def test_RH_zhijian(self):
        self.open("http://10.0.0.75:811/index")
        self.check_status(self)
        try:
            #cookie_str = 'rememberMe=true; sidebarStatus=0; Admin-Expires-In=1440; Library-Admin-Token=efc23d1e-4231-4e4c-a4bc-bd9580fca98a; Library-Admin-Expires-In=1440; username=%E8%BF%9E%E4%B8%B0; Admin-Token=7ca90765-50a7-4764-95dc-7778aba3585d; SECKEY_ABVK=15f1tu6efvNtyWjLK00b9eq/O6lDkhfQy2Iw9GZ3sQA%3D; BMAP_SECKEY=4tI4P075HGG4nzQR9ivDkYMwa9Nurh3hBEXOjMGcRzkEqzyvK-VLA8lLzOg4oCi_6FiuNsMzP36Cnr9XSSrZanCOLy-qIY4Zqx9zh48y7yTrTsBPmPC2vuQEGTqzwzZ60e5u8bVbVundbxUkyFfhhokHpfxM9N7BvkBp6sPL4DNV0hQZhkDbYuaoB6TBcMgN; password=dsXIP9RWOy5e0iXd93+PQAeW68MAo97nraIeoHprH1TUyH3Xrj+IgP0HjC7YXIGYT6Cn2k3doL82GpJRl19wVg==; integrated-platform-Token=b3453bcc-a8cd-4b64-92e5-c8b30832fd1b'
            self.cookie_adder(cookie_str)
            self.maximize_window()
            self.open("http://10.0.0.75:811/index")
            self.check_status(self)
            while True:
                #############################  质检方案  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(21) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(21) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(21) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(21) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(21) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(3) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(21) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(3)')

                #############################  检验单管理  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(21) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(21) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(21) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(21) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(21) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(3) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(21) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(3)')

                ##############################  样品管理  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(21) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(21) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(21) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(21) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(21) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(3) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(21) > div > div.app-menu > div:nth-child(3) > div.wrap-item > div:nth-child(3)')


                if self.get_current_url() != 'http://10.0.0.75:811':  # 变更这里的 URL 为你希望跳转的页面
                    print("测试完成")
                    break

        except Exception as e:
            print(f"抱歉，出现错误：{str(e)}")
            tb_str = traceback.format_exception(etype=type(e), value=e, tb=e.__traceback__)
            print("".join(tb_str))  # 显示详细的错误追踪信息，包括在哪一行代码触发的错误

    ##############################  财务  ##########################################
    def test_RH_caiwu(self):
        self.open("http://10.0.0.75:811/index")
        self.check_status(self)
        try:
            #cookie_str = 'rememberMe=true; sidebarStatus=0; Admin-Expires-In=1440; Library-Admin-Token=efc23d1e-4231-4e4c-a4bc-bd9580fca98a; Library-Admin-Expires-In=1440; username=%E8%BF%9E%E4%B8%B0; Admin-Token=7ca90765-50a7-4764-95dc-7778aba3585d; SECKEY_ABVK=15f1tu6efvNtyWjLK00b9eq/O6lDkhfQy2Iw9GZ3sQA%3D; BMAP_SECKEY=4tI4P075HGG4nzQR9ivDkYMwa9Nurh3hBEXOjMGcRzkEqzyvK-VLA8lLzOg4oCi_6FiuNsMzP36Cnr9XSSrZanCOLy-qIY4Zqx9zh48y7yTrTsBPmPC2vuQEGTqzwzZ60e5u8bVbVundbxUkyFfhhokHpfxM9N7BvkBp6sPL4DNV0hQZhkDbYuaoB6TBcMgN; password=dsXIP9RWOy5e0iXd93+PQAeW68MAo97nraIeoHprH1TUyH3Xrj+IgP0HjC7YXIGYT6Cn2k3doL82GpJRl19wVg==; integrated-platform-Token=b3453bcc-a8cd-4b64-92e5-c8b30832fd1b'
            self.cookie_adder(cookie_str)
            self.maximize_window()
            self.open("http://10.0.0.75:811/index")
            self.check_status(self)
            while True:
                #############################  收付款管理  ##########################################
                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(22) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(22) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(22) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(22) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(2)')

                ##############################  合同发票  ##########################################
                #有BUG，合同管理打开为空
                # self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                # element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(22) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                # print("正在测试的应用是" + element_text)
                # self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(22) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(1)')
                #有BUG，发票管理打开为空
                # self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                # element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(22) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                # print("正在测试的应用是" + element_text)
                # self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(22) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(22) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(3) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(22) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(3)')
                #有BUG，运输合同打开为空
                # self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                # element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(22) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(4) > div > div.router-title')
                # print("正在测试的应用是" + element_text)
                # self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(22) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(4)')
                #有BUG，合同分类打开为空
                # self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                # element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(22) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(5) > div > div.router-title')
                # print("正在测试的应用是" + element_text)
                # self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(22) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(5)')

                if self.get_current_url() != 'http://10.0.0.75:811':  # 变更这里的 URL 为你希望跳转的页面
                    print("测试完成")
                    break

        except Exception as e:
            tb_str = traceback.format_exception(etype=type(e), value=e, tb=e.__traceback__)
            print(f"抱歉，出现错误：{str(e)}")
            print("".join(tb_str))  # 显示详细的错误追踪信息，包括在哪一行代码触发的错误

    ##############################  办公  ##########################################
    def test_RH_bangong(self):
        self.open("http://10.0.0.75:811/index")
        self.check_status(self)
        try:
            #cookie_str = 'rememberMe=true; sidebarStatus=0; Admin-Expires-In=1440; Library-Admin-Token=efc23d1e-4231-4e4c-a4bc-bd9580fca98a; Library-Admin-Expires-In=1440; username=%E8%BF%9E%E4%B8%B0; Admin-Token=7ca90765-50a7-4764-95dc-7778aba3585d; SECKEY_ABVK=15f1tu6efvNtyWjLK00b9eq/O6lDkhfQy2Iw9GZ3sQA%3D; BMAP_SECKEY=4tI4P075HGG4nzQR9ivDkYMwa9Nurh3hBEXOjMGcRzkEqzyvK-VLA8lLzOg4oCi_6FiuNsMzP36Cnr9XSSrZanCOLy-qIY4Zqx9zh48y7yTrTsBPmPC2vuQEGTqzwzZ60e5u8bVbVundbxUkyFfhhokHpfxM9N7BvkBp6sPL4DNV0hQZhkDbYuaoB6TBcMgN; password=dsXIP9RWOy5e0iXd93+PQAeW68MAo97nraIeoHprH1TUyH3Xrj+IgP0HjC7YXIGYT6Cn2k3doL82GpJRl19wVg==; integrated-platform-Token=b3453bcc-a8cd-4b64-92e5-c8b30832fd1b'
            self.cookie_adder(cookie_str)
            self.maximize_window()
            self.open("http://10.0.0.75:811/index")
            self.check_status(self)
            while True:
                #############################  流程管理  ##########################################
                #有BUG，订单管理打开为空
                # self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                # element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(23) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                # print("正在测试的应用是" + element_text)
                # self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(23) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(1)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(23) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(2) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(23) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(2)')

                self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(23) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(3) > div > div.router-title')
                print("正在测试的应用是" + element_text)
                self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(23) > div > div.app-menu > div:nth-child(1) > div.wrap-item > div:nth-child(3)')

                ##############################  企业OA  ##########################################
                #有BUG，考勤配置打开为空
                # self.click_when_visible('.el-tooltip.iconfont.item.svg-icon.applicate-class')
                # element_text = self.get_text('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(23) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(1) > div > div.router-title')
                # print("正在测试的应用是" + element_text)
                # self.click_when_visible_and_close('#app > div > div.app-wrapper__container.ly-flex-1 > div.s-side-menu-content > div.applicate-drawer > div > div > div > section > div > div.container > div:nth-child(23) > div > div.app-menu > div:nth-child(2) > div.wrap-item > div:nth-child(1)')

                if self.get_current_url() != 'http://10.0.0.75:811':  # 变更这里的 URL 为你希望跳转的页面
                    print("测试完成")
                    break

        except Exception as e:
            tb_str = traceback.format_exception(etype=type(e), value=e, tb=e.__traceback__)
            print(f"抱歉，出现错误：{str(e)}")
            print("".join(tb_str))  # 显示详细的错误追踪信息，包括在哪一行代码触发的错误

    ##############################  临时目录  ##########################################
    def test_RH_linshi(self):
        self.open("http://10.0.0.75:811/index")
        self.check_status(self)
        try:
            #cookie_str = 'rememberMe=true; sidebarStatus=0; Admin-Expires-In=1440; Library-Admin-Token=efc23d1e-4231-4e4c-a4bc-bd9580fca98a; Library-Admin-Expires-In=1440; username=%E8%BF%9E%E4%B8%B0; Admin-Token=7ca90765-50a7-4764-95dc-7778aba3585d; SECKEY_ABVK=15f1tu6efvNtyWjLK00b9eq/O6lDkhfQy2Iw9GZ3sQA%3D; BMAP_SECKEY=4tI4P075HGG4nzQR9ivDkYMwa9Nurh3hBEXOjMGcRzkEqzyvK-VLA8lLzOg4oCi_6FiuNsMzP36Cnr9XSSrZanCOLy-qIY4Zqx9zh48y7yTrTsBPmPC2vuQEGTqzwzZ60e5u8bVbVundbxUkyFfhhokHpfxM9N7BvkBp6sPL4DNV0hQZhkDbYuaoB6TBcMgN; password=dsXIP9RWOy5e0iXd93+PQAeW68MAo97nraIeoHprH1TUyH3Xrj+IgP0HjC7YXIGYT6Cn2k3doL82GpJRl19wVg==; integrated-platform-Token=b3453bcc-a8cd-4b64-92e5-c8b30832fd1b'
            self.cookie_adder(cookie_str)
            self.maximize_window()
            self.open("http://10.0.0.75:811/index")
            self.check_status(self)
            while True:
                #############################  场站管理  ##########################################

                ##############################  设备管控  ##########################################

                if self.get_current_url() != 'http://10.0.0.75:811':  # 变更这里的 URL 为你希望跳转的页面
                    print("测试完成")
                    break

        except Exception as e:
            tb_str = traceback.format_exception(etype=type(e), value=e, tb=e.__traceback__)
            print(f"抱歉，出现错误：{str(e)}")
            print("".join(tb_str))  # 显示详细的错误追踪信息，包括在哪一行代码触发的错误









    # def test_shouqian(self):
    #     self.open("http://10.0.0.75:8111/index")
    #     try:
    #         # 添加 cookie
    #         self.driver.add_cookie({'name': 'rememberMe', 'value': 'true'})
    #         self.driver.add_cookie({'name': 'sidebarStatus', 'value': '0'})
    #         self.driver.add_cookie({'name': 'Admin-Expires-In', 'value': '1440'})
    #         self.driver.add_cookie({'name': 'Library-Admin-Token', 'value': 'efc23d1e-4231-4e4c-a4bc-bd9580fca98a'})
    #         self.driver.add_cookie({'name': 'Library-Admin-Expires-In', 'value': '1440'})
    #         self.driver.add_cookie({'name': 'username', 'value': '%E8%BF%9E%E4%B8%B0'})
    #         self.driver.add_cookie({'name': 'password', 'value': 'VAPJ0uSrSIjy1V5JRVyNiMGVLvKsAGSoxV2+YSSUGxhSYlEK0Y6EiKi0DxzOkizVwaNQMOO3+mVBXAHd3uK3iw=='})
    #         self.driver.add_cookie({'name': 'integrated-platform-Token', 'value': '9ad044c2-61e2-430f-99a1-1de0364ebc92'})
    #         self.driver.add_cookie({'name': 'SECKEY_ABVK', 'value': 'YCX40vixPI/X7o9JGy8lc8lMVOlhXnb/cTRoC1qqAlw%3D'})
    #         self.driver.add_cookie({'name': 'BMAP_SECKEY', 'value': 'vrOdL9oVxEd9l5LULeSN3PD-TMrb_qn7TIRu_NBXXvzn25TfkuaCCf2C5HLYkaxcG7IkZs5ZasR8X9WmoYje4JnsUcsIL-aq5dmriMN-jz5S9c50hHeF8jXQ8QDbg9TQzRPRuVmOA18cK9jXumevEBFc7224mYlQ0vwYwb25cchNYX7zkX-ZRc1KhjNFT0no'})
    #
    #         # 刷新页面以使 cookie 生效
    #         self.open("http://10.0.0.75:8111/index")
    #     except Exception as e:
    #         print(f"抱歉，出现错误：{str(e)}")

    # @staticmethod   # 静态方法
    # def ocr(img_path):
    #     image = Image.open(img_path)
    #     text = pytesseract.image_to_string(image)
    #     return text

    # 识别验证码
    # element = self.find_element('.login-code img')
    # img_src = element.get_attribute('src')
    # print(element)
    # print(img_src)
    # try:
    #     img_data = base64.b64decode(img_src.split(',')[1])
    #     img = Image.open(BytesIO(img_data))
    #
    #     # 使用 tesseract 识别图像中的文本
    #     code = pytesseract.image_to_string(img)
    #     print(code)
    # except (IndexError, binascii.Error, Exception) as e:
    #     print(f"抱歉，处理图像时出现错误：{str(e)}")
